home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / grphwiz.dxr / 00085_open button.ls < prev    next >
Encoding:
Text File  |  2000-01-14  |  1.0 KB  |  41 lines

  1. property ancestor, pMIAW
  2. global gGraph, gIsRolloverTextOn
  3.  
  4. on new me, buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, descendant
  5.   if objectp(descendant) then
  6.     ancestor = new(script("button with balloon"), buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, descendant)
  7.   else
  8.     ancestor = new(script("button with balloon"), buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, me)
  9.   end if
  10.   cursor = [member("point hand", "graph.cst"), member("point hand mask", "graph.cst")]
  11.   set the cursor of sprite the pChannel of me to cursor
  12.   return me
  13. end
  14.  
  15. on setMIAW me, miaw
  16.   pMIAW = miaw
  17.   return me
  18. end
  19.  
  20. on performFunction me
  21.   tell the stage
  22.     playSFX(5)
  23.   end tell
  24.   openFromFile(pMIAW)
  25.   return me
  26. end
  27.  
  28. on performRolloverFunction me
  29.   if gIsRolloverTextOn then
  30.     performRolloverFunction(ancestor)
  31.   end if
  32.   return me
  33. end
  34.  
  35. on performRolloffFunction me
  36.   if gIsRolloverTextOn then
  37.     performRolloffFunction(ancestor)
  38.   end if
  39.   return me
  40. end
  41.